Fix geizhals price parsing#15990
Fix geizhals price parsing#15990balloob merged 10 commits intohome-assistant:devfrom JulianKahnert:patch-2
Conversation
MartinHjelmare
left a comment
There was a problem hiding this comment.
The GeizParser class should be broken out into standalone library published on pypi.
| raw = soup.find_all('span', attrs={'itemprop': 'name'}) | ||
| self.device_name = raw[1].string | ||
| # Parse name | ||
| raw = soup.find('h1', attrs={'class': 'gh-headline'}) |
There was a problem hiding this comment.
This should be extracted from Home Assistant and into a separate Python library. We will not be able to accept any changes to this platform until this is fixed.
There was a problem hiding this comment.
Thanks for your comments @MartinHjelmare and @balloob ! I will create a separate library for that.
|
I found a bug in the geizhals Library. Please do not merge it yet! |
|
Before we merge we should also add a paragraph in the PR description about the breaking change, since config options changed. |
|
The Geizhals library was fixed in JulianKahnert/geizhals@5401a94 and the HA component was fixed in b949fc5. @MartinHjelmare, I added a description of the breaking change in the PR description. |
MartinHjelmare
left a comment
There was a problem hiding this comment.
We should initialize self.device in init.
|
Thanks @MartinHjelmare for your reply. You are absolutly right! I added this in 828d556 |
|
Hey @MartinHjelmare , can you merge this? |
|
There seems to be a problem installing the geizhals library. The travis job failed: It looks like the package is imported in |
| self.data = GeizParser(product_id, domain, regex) | ||
| self._state = None | ||
| self.product_id = product_id | ||
| self.device = Device() |
There was a problem hiding this comment.
Please use another attribute name. Entity device is a property now after a recent PR.
|
You still have an installation issue with your lib. You cannot import your own lib inside |
|
Hi there, I'm sorry for wasting your time! d20403d should fix the problem. |
Description:
BREAKING CHANGE: The configuration changes from
to:
Possible
localevalues are:AT,EU,DE,UKorPLPull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.io#6026
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.